from pyzbar.pyzbar import decode
from PIL import Image

# 解码图片中的QR Code
decoded_objects = decode(Image.open('qrcode.png'))
for obj in decoded_objects:
    print(f"Type: {obj.type}, Data: {obj.data.decode('utf-8')}")